package service

import (
	"fmt"
	"shop/config/constant"
	"shop/dao"
	"shop/entity"
	"shop/utils/convertutil"
)

// GetShopInfo 获取店铺信息，一定不为空
func GetShopInfo(shopId int) *entity.ShopInfo {
	shop := &entity.ShopInfo{}
	data := dao.GetRedisCli().HGet(constant.CacheKeyShopInfoMap, fmt.Sprintf("%d", shopId)).Val()
	convertutil.ParseJson(data, shop)
	return shop
}
